package NProfessor;

import java.awt.BorderLayout;
 
import java.awt.GridBagConstraints;
 
import java.awt.GridBagLayout;
 
import java.awt.Insets;
 
import java.awt.LayoutManager;
 

 



import javax.swing.JButton;
 
import javax.swing.JLabel;
 
import javax.swing.JPanel;
 
import javax.swing.JTextField;
 



import Connecting.Top_DepartVO;
import Connecting.Top_ProfessorVO;
import Connecting.Top_StudentVO;

import java.awt.GridLayout;
 

 
public class GradeCapsulation extends JPanel {
 
        
 
        private JTextField tf2;
 
        private JTextField tf3;
 
        private JTextField tf4;
 
        private JTextField tf5;
 
        private JTextField tf6;
 
        private JTextField tf7;
 
        private JTextField tf8;
 
        
 
        
 
        public GradeCapsulation() {
 
                
 
                setLayout( new BorderLayout(0,0));
 
                
 
                 //   * TOP *
 
                makeTopPanel();
 
        
 
                
 
                //   * CENTER *
 
                makeCenterPanel();
 
                
 
                //   * BOTTOM *
 
                makeBottomPanel();
 
                
 
        }
 
        public void makeTopPanel(){
 
        JPanel top = new JPanel();
 
        add(top, BorderLayout.NORTH);
 
        
 
        JLabel nlb1 = new JLabel("성적 등록 창");
 
        top.add(nlb1);
 
        }
 
        
 
        public void makeCenterPanel(){
        	Top_ProfessorVO pv = new Top_ProfessorVO();
        	Top_StudentVO sv = new Top_StudentVO();
        	Top_DepartVO dv = new Top_DepartVO();
            JTextField txt = new JTextField(); 
       	
                JPanel center = new JPanel();
 
                add(center, BorderLayout.CENTER);
 
                center.setLayout(new GridLayout(0, 4, 0, 0));
 
                
 
                JLabel nlb2 = new JLabel("학생 이름 :");
 
                center.add(nlb2);
 
                
 
                tf2 = new JTextField();
 
                center.add(tf2);
 
                tf2.setColumns(10);
                sv.setStd_name(txt.getText());
                sv.getStd_name();
                
 
                JLabel nlb3 = new JLabel("학생 학번 :");
 
                center.add(nlb3);
               
                
 
                tf3 = new JTextField();
 
                center.add(tf3);
 
                tf3.setColumns(10);
                sv.setStd_no(txt.getText());
                sv.getStd_no();
 
                JLabel nlb4 = new JLabel("획득 점수 :");
 
                center.add(nlb4);
 
                
 
                tf4 = new JTextField();
 
                center.add(tf4);
 
                tf4.setColumns(10);
             
                
                JLabel nlb5 = new JLabel("평점 변환 :");
 
                center.add(nlb5);
 
                
 
                tf5 = new JTextField();
 
                center.add(tf5);
 
                tf5.setColumns(10);
 
                
 
                JLabel nlb6 = new JLabel("과목 명 :");
 
                center.add(nlb6);
 
                
 
                tf6 = new JTextField();
 
                center.add(tf6);
 
                tf6.setColumns(10);
 
                
 
                JLabel nlb7 = new JLabel("학과 명 :");
 
                center.add(nlb7);
                
 
                tf7 = new JTextField();
 
                center.add(tf7);
 
                tf7.setColumns(10);
                dv.setDept_name(txt.getText());
                dv.getDept_name();
                
 
                JLabel nlb8 = new JLabel("담당 교수 :");
 
                center.add(nlb8);
                
 
                tf8 = new JTextField();
 
                center.add(tf8);
 
                tf8.setColumns(10);
                pv.setProf_name(txt.getText());
                pv.getProf_name();
        }
 
        
 
        public void makeBottomPanel(){
 
                JPanel bottom = new JPanel();
 
                add(bottom, BorderLayout.SOUTH);
 
                
 
                JButton btn1 = new JButton("등록");
 
                bottom.add(btn1);
 
                
 
        }
 
        }
 
